-
Notifications
You must be signed in to change notification settings - Fork 803
[SYCL][Docs] Add sycl_ext_oneapi_inter_process_communication #20018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: sycl
Are you sure you want to change the base?
[SYCL][Docs] Add sycl_ext_oneapi_inter_process_communication #20018
Conversation
cae8ee3
to
14415fe
Compare
14415fe
to
89f495c
Compare
89f495c
to
5f443ab
Compare
5f443ab
to
b7d2052
Compare
b7d2052
to
07f4355
Compare
07f4355
to
7364b75
Compare
This commit adds a new extension for inter-process communicable SYCL object handles. As part of the initial version of this extension, only inter-process communicable memory is exposed. Signed-off-by: Larsen, Steffen <[email protected]>
7364b75
to
eec1fe5
Compare
@@ -439,3 +440,10 @@ struct ur_mem_handle_t_ : ur::cuda::handle_base { | |||
} | |||
} | |||
}; | |||
|
|||
struct ur_exp_ipc_mem_handle_t_ { | |||
umf_memory_pool_handle_t UMFPool; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need UMFPool
to be part of the handle?
Signed-off-by: Larsen, Steffen <[email protected]>
#if defined(__linux__) | ||
// UMF currently requires ptrace permissions to be set for the spawner. As | ||
// such we need to set it until this limitation has been addressed. | ||
// https://github.com/oneapi-src/unified-memory-framework/tree/main?tab=readme-ov-file#level-zero-memory-provider | ||
if (Q.get_backend() == sycl::backend::ext_oneapi_level_zero && | ||
prctl(PR_SET_PTRACER, getppid()) == -1) { | ||
std::cout << "Failed to set ptracer permissions!" << std::endl; | ||
return 1; | ||
} | ||
#endif // defined(__linux__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to decide if it has to be an application responsibility to set the required permissions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. We could move this to the adapter. Seems too low-level as a requirement at user-level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, but there might be security concerns
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we designed IPC support in UMF, we agreed that it should be client's responsibility to change the security permissions. However, UMF is a low-level API, and it is acceptable at that level.
Signed-off-by: Larsen, Steffen <[email protected]>
Signed-off-by: Larsen, Steffen <[email protected]>
This commit adds a new extension for inter-process communicable SYCL object handles. As part of the initial version of this extension, only inter-process communicable memory is exposed.